﻿<UserControl x:Class="TimHeuer.Expression.S3Publish.StandardSettings"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="auto" Width="auto" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
    <UserControl.Resources>
        <Storyboard x:Name="AuthFailed" x:Key="Authentication_Failed">
            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                <SplineColorKeyFrame KeyTime="00:00:00.5000000" Value="#FFBE0606" />
            </ColorAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="AuthSuccess" x:Key="Authentication_Succeeded">
            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                <SplineColorKeyFrame KeyTime="00:00:00.5000000" Value="#FF5BE907" />
            </ColorAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="AuthWaiting" x:Key="Authentication_Waiting" RepeatBehavior="Forever">
            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                <SplineColorKeyFrame x:Uid="SplineColorKeyFrame_3" KeyTime="00:00:00.5000000" Value="#FFFFEB00" />
                <SplineColorKeyFrame x:Uid="SplineColorKeyFrame_4" KeyTime="00:00:01" Value="#FFFF8300" />
            </ColorAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="NoAuth" x:Key="Authentication_NotAuthenticated">
            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                <SplineColorKeyFrame KeyTime="00:00:00.5000000" Value="#FF454545" />
            </ColorAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <Grid Height="Auto">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" MinHeight="24" />
            <RowDefinition Height="Auto" MinHeight="23.727" />
            <RowDefinition Height="Auto" MinHeight="23.727" />
            <RowDefinition Height="Auto" MinHeight="13.103" />
            <RowDefinition Height="Auto" MinHeight="12.857" />
            <RowDefinition Height="Auto" MinHeight="12.857" />
            <RowDefinition Height="Auto" MinHeight="12.857" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100" MinWidth="100" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Label Grid.Column="0" Grid.Row="1" HorizontalAlignment="Right" Margin="0,0,3,0" Content="Bucket" Height="Auto" VerticalAlignment="Center" />
        <ComboBox x:Name="BucketList" IsEditable="True" Text="{Binding Path=DestinationBucket, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsSynchronizedWithCurrentItem="True" Grid.Column="1" Grid.Row="1" Height="Auto" VerticalAlignment="Top" ToolTip="Choose the S3 Bucket to publish to" />
        <CheckBox Name="PublicObject" Grid.Column="1" Grid.Row="3" Margin="0,0,0,3" Content="Make public (read-only)" ToolTip="Select to enable the uploaded object(s) to be read only" IsChecked="{Binding Path=MakePublic, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
        <Label Grid.Column="0" Grid.Row="4" HorizontalAlignment="Right" Margin="0,0,3,0" Content="Access Key" Grid.RowSpan="1" />
        <TextBox Name="S3AccessKey" Grid.Column="1" Grid.Row="4" Height="Auto" VerticalAlignment="Top" Text="{Binding Path=AccessKey, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ToolTip="Enter user name to access the server" />
        <Label Grid.Column="0" Grid.Row="5" HorizontalAlignment="Right" Margin="0,0,3,0" Content="Secret" />
        <TextBox Name="S3Secret" Grid.Row="5" Grid.Column="1" ToolTip="Enter S3 secret" Margin="0,2.5,0,2.5" Text="{Binding Path=SecretKey, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
        <CheckBox Name="SaveSecret" Grid.Column="1" Grid.Row="6" Margin="0,0,0,3" Content="Save secret key" ToolTip="Save the S3 secret token" IsChecked="{Binding Path=SaveSecret, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
        <StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="7" HorizontalAlignment="Left" Height="28" Margin="0,2.5,0,2.5">
            <Button Name="authenticate" Click="authenticate_Click">
                <StackPanel Margin="4" Orientation="Horizontal" VerticalAlignment="Center">
                    <Ellipse x:Name="ellipse" Fill="#FF454545" StrokeThickness="1" Stroke="#5EFFFFFF" Width="14" Height="14" />
                    <Label Content="List Buckets" Margin="3,-5,-2,-3" HorizontalAlignment="Left" Foreground="#FFFFFFFF" FontSize="12" />
                </StackPanel>
            </Button>
        </StackPanel>
    </Grid>
</UserControl>